<div id="syncConfigTree" class="demo-tree"></div>

<script type="text/javascript">

    $(function(){
        layui.use(['tree','layer'], function(){
            var tree = layui.tree
                ,layer = layui.layer

            var configTree = $('#tempConfigTreeData').data('tempConfigTreeData');
            var layId = $('#tempSyncLayId').attr('layId');

            if (configTree != null){
                tree.render({
                    elem: '#syncConfigTree',
                    data: configTree,
                    onlyIconControl: true,  //是否仅允许节点左侧图标控制展开收缩
                    click: function(obj){
                        document.getElementById("eConfigId1").value= obj.data.id;
                        document.getElementById("eConfigName1").value= obj.data.title;

                        layer.close(layId);
                    }
                });
            }

        });
    })





</script>